export function WithInstall(component, alisa) {
  const componentName = component.name;
  if (!componentName) return; // 组件名不存在无法注册当前组件

  const install = (app) => {
    app.component(componentName, component);
    if (alisa) {
      app.config.globalProperties[alisa] = component;
    }
  };

  component.install = install;

  return component;
}
